type AppendToObject<T extends Record<string, any>, U extends string, V> = {
  [P in keyof T | U]: P extends U ? V : T[P];
};

type test1 = {
  key: "cat";
  value: "green";
};

type testExpect1 = AppendToObject<test1, "home", boolean>;

// const p: testExpect1 = {
//   key: "cat",
//   value: "green",
//   home: false,
// };
